<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:with="name='张三'">
    姓名：<span th:text="${name}"></span>
    年龄：<span th:text="${age}"></span>
</div>

<br/>
<br/>
<div th:with="id=1001,name='李四',age=${age}">
    学号：<spn th:text="${id}"></spn>
    姓名：<span th:text="${name}"></span>
    年龄：<span th:text="${age}"></span>
</div>
</body>
</html>